export interface Position {
  row: number
  col: number
  from?: {
    row: number
    col: number
  }
}

export interface GameState {
  gameTime: {
    white: number
    black: number
  }
  capturedPieces: {
    white: string[]
    black: string[]
  }
  moveHistory: string[]
  moveStack: {
    board: (string | null)[][]
    piece: string
    fromRow: number
    fromCol: number
    toRow: number
    toCol: number
    capturedPiece: string | null
    castlingRights: {
      white: { kingside: boolean, queenside: boolean }
      black: { kingside: boolean, queenside: boolean }
    }
  }[]
  addMove: (from: string, to: string, piece: string, capture?: string) => void
  addCapture: (piece: string) => void
  undoMove: () => boolean
}

export interface TutorialStep {
  title: string
  description: string
  board: (string | null)[][]
  highlightSquares?: Position[]
  validMoves?: Position[]
}

export interface GameRecording {
  id: string
  date: Date
  moves: {
    from: { row: number, col: number }
    to: { row: number, col: number }
    piece: string
    captured?: string
    promotion?: string
    check?: boolean
    checkmate?: boolean
    time?: number
  }[]
  result?: string
  whitePlayer: string
  blackPlayer: string
  timeControl: {
    initial: number
    increment: number
  }
  tags: {
    event?: string
    site?: string
    round?: string
    eco?: string
  }
} 